<template>
  <div>
    <div>
      <label>评论</label>
      <hr>
    </div>
    <div>
      <li>
        XXX评论: XXX
      </li>
    </div>
    <div style="padding: 5px">
      <textarea v-model="content" style="width: 80%;height: 50px;" placeholder="内容">    </textarea>
    </div>
    <div style="padding-top: 10px;">
      <button @click="send_comment">评论</button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      content: '',
      comments: []
    }
  },
  methods: {
    send_comment() {

    }
  },
  created() {
    this.$http.get('http://localhost:3000/comment/' + this.$route.query.id)
        .then((result) => {
          this.comments = result.data.data;
        })
        .catch((error) => {
          alert('获取评论信息失败,错误信息为:' + error);
        });
  }
}
</script>

<style lang="css" scoped></style>